Skip to main content

Authentication

Construct your client authentication to generate an access token to access Peddler API resources. We recommend to implement this as a re-usable utility/service. (See access token section).

  • Peddler provides separate private keys for each carrier which takes into account various security considerations.
  • We urge you to store private keys securely, utilising your selected key management solution or secure storage vault.
Important

Keys should never be included or hard-coded into source code.

Note on CARRIER_ID

The CARRIER_ID is a unique identifier for your carrier account. It is provided to you by Peddler.

Example:

curl --location --request POST '${PEDDLER_API_DOMAIN}/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<insert_client_id_here>' \
--data-urlencode 'client_secret=<insert_client_secret_here>' \
--data-urlencode 'scope=DEFAULT authenticated CARRIER_ID' \
--timeout 180000
Response
{
"access_token":"FkzdyJV14zc73AaK9FmNCtyp5bUTegis",
"expires_in":7200,
"scope":"DEFAULT authenticated",
"token_type":"Bearer"
}